package entity

import ()

type Fault struct {
	Id int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	UserId int64 `gorm:"column:user_id;type:BIGINT" json:"user_id"`

	EbikeId int64 `gorm:"column:ebike_id;type:BIGINT" json:"ebike_id"`

	EbikeName string `gorm:"column:ebike_name;type:VARCHAR(255)" json:"ebike_name"`

	EbikeTypeId int64 `gorm:"column:ebike_type_id;type:BIGINT" json:"ebike_type_id"`

	EbikeTypeName string `gorm:"column:ebike_type_name;type:VARCHAR(255)" json:"ebike_type_name"`

	Phone string `gorm:"column:phone;type:VARCHAR(255)" json:"phone"`

	FaultId int64 `gorm:"column:fault_id;type:BIGINT" json:"fault_id"`

	FaultName string `gorm:"column:fault_name;type:VARCHAR(255)" json:"fault_name"`

	FaultDesc string `gorm:"column:fault_desc;type:VARCHAR(255)" json:"fault_desc"`

	FaultEnum int64 `gorm:"column:fault_enum;type:BIGINT" json:"fault_enum"`

	Level int `gorm:"column:level;type:TINYINT" json:"level"`

	SnCode string `gorm:"column:sn_code;type:VARCHAR(255)" json:"sn_code"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`
}

func (a *Fault) TableName() string {
	return "faults"
}
